package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 出入库记录对象 goodsmovement
 *
 * @author ruoyi
 * @date 2024-12-05
 */
public class Goodsmovement extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long movementId;

    /** 操作日期 */
    @Excel(name = "操作日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date movementDate;

    /** 仓库编号 */
    @Excel(name = "仓库编号")
    private Long warehouseId;

    /** 仓库名称 (通过联接查询获取) */
    @Excel(name = "仓库名称")
    private String warehouseName;

    /** 商品编号 */
    @Excel(name = "商品编号")
    private Long goodsNum;

    /** 商品名称 (通过联接查询获取) */
    @Excel(name = "商品名称")
    private String goodsName;

    /** 商品库存数量 (通过联接查询获取) */
    @Excel(name = "库存数量")
    private Long goodsQuantity;

    /** 商品单价 (通过联接查询获取) */
    @Excel(name = "单价")
    private BigDecimal goodsPrice;

    /** 操作类型：入库/出库 */
    @Excel(name = "操作类型", readConverterExp = "IN=入库,OUt=出库")
    private String operationType;

    /** 数量变化 */
    @Excel(name = "数量变化")
    private Long changeQuantity;


    // Getters and Setters

    public Long getMovementId() {
        return movementId;
    }

    public void setMovementId(Long movementId) {
        this.movementId = movementId;
    }

    public Date getMovementDate() {
        return movementDate;
    }

    public void setMovementDate(Date movementDate) {
        this.movementDate = movementDate;
    }

    public Long getWarehouseId() {
        return warehouseId;
    }

    public void setWarehouseId(Long warehouseId) {
        this.warehouseId = warehouseId;
    }

    public String getWarehouseName() {
        return warehouseName;
    }

    public void setWarehouseName(String warehouseName) {
        this.warehouseName = warehouseName;
    }

    public Long getGoodsNum() {
        return goodsNum;
    }

    public void setGoodsNum(Long goodsNum) {
        this.goodsNum = goodsNum;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public Long getGoodsQuantity() {
        return goodsQuantity;
    }

    public void setGoodsQuantity(Long goodsQuantity) {
        this.goodsQuantity = goodsQuantity;
    }

    public BigDecimal getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(BigDecimal goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public String getOperationType() {
        return operationType;
    }

    public void setOperationType(String operationType) {
        this.operationType = operationType;
    }

    public Long getChangeQuantity() {
        return changeQuantity;
    }

    public void setChangeQuantity(Long changeQuantity) {
        this.changeQuantity = changeQuantity;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("movementId", getMovementId())
            .append("movementDate", getMovementDate())
            .append("warehouseId", getWarehouseId())
            .append("warehouseName", getWarehouseName())
            .append("goodsNum", getGoodsNum())
            .append("goodsName", getGoodsName())
            .append("goodsQuantity", getGoodsQuantity())
            .append("goodsPrice", getGoodsPrice())
            .append("operationType", getOperationType())
            .append("changeQuantity", getChangeQuantity())
            .toString();
    }
}